Q: How do I cause mail to destinations outside our local network to be forwarded automatically through some outside service?\
\
A: Some minor changes to your mailhost's
\b sendmail.cf
\b0 file will do the trick. The sendmail configuration file,
\b /etc/sendmail/sendmail.cf
\b0 is either a link to
\b sendmail.mailhost.cf
\b0 or is some variant of the mailhost configuration. You will edit this file on your mailhost — the machine which is responsible for forwarding mail.\
\
Look for the following lines near the top of the file (in the default
\b sendmail.mailhost.cf
\b0 , they start at line 30):\
\
\pard\tx1240\tx2480\tx3740\tx4980\tx6240\tx7480\tx8720\tx9980\tx11220\tx12480\f2\fs20\fi720\fc0 # If you want to use a relay mailer, examine ruleset 0. There are some\
# rules that need to be uncommented\
DMuucp\
\
# major relay host: use the $M mailer to send mail to other domains\
# To have mail automatically forwarded to other domains, you should\
# replace this with the name of your major relay host.\
tells sendmail that mail destined for a machine off the local network should be forwarded using the “uucp” mailer — i.e., using the UNIX UUCP facility. The lines \
\
\pard\tx1240\tx2480\tx3740\tx4980\tx6240\tx7480\tx8720\tx9980\tx11220\tx12480\f2\fs20\fi720\fc0 DR mail-relay\
\b0 is the forwarding host. Change these three lines to reflect your actual situation. Typically,
\b uucp
\b0 is the appropriate mailer if you're not on the Internet. Either replace
\b mail-relay
\b0 with the name of your UUCP partner, or ensure that
\b mail-relay
\b0 is a host alias of that partner. (Note that if you make
\b mail-relay
\b0 be an alias for that partner and you're using UUCP as the relay mail mechanism, you'll have to modify the UUCP configuration files to reflect this alias.)\
\
If you look at the comments which begin the excerpt included above, you'll see a note regarding uncommenting some lines in “ruleset 0.” Look for the following lines in
\b sendmail.cf
\b0 (at line 323 in the default
\b sendmail.mailhost.cf
\b0 ):\
\
\pard\tx1240\tx3180\tx4980\tx7680\tx8720\tx9980\tx11220\tx12480\f2\fs20\fi720\fc0 # If you want to pass all other explicit domain names up the ladder\
# to our forwarder then uncomment the following line.\
\i0 careful when you modify a sendmail configuration file. As you might notice, the syntax is arcane and cryptic, and the “rewriting rules” in the configuration file are intricate.\